﻿namespace SLClient.ServiceAPI
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.Serialization;
    using System.Threading;

    [DebuggerStepThrough, GeneratedCode("System.Runtime.Serialization", "4.0.0.0"), DataContract(Name="ManualSetting", Namespace="http://schemas.datacontract.org/2004/07/SLClient")]
    public class ManualSetting : INotifyPropertyChanged
    {
        private decimal AmountField;
        private DateTime CreateTimeField;
        private int IdField;
        private string OrderIdField;
        private PropertyChangedEventHandler _PropertyChanged;
        private Guid UserIdField;

        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Combine(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
            remove
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Remove(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
        }

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember(Order=3)]
        public decimal Amount
        {
            get
            {
                return this.AmountField;
            }
            set
            {
                if (!this.AmountField.Equals(value))
                {
                    this.AmountField = value;
                    this.RaisePropertyChanged("Amount");
                }
            }
        }

        [DataMember(Order=2)]
        public DateTime CreateTime
        {
            get
            {
                return this.CreateTimeField;
            }
            set
            {
                if (!this.CreateTimeField.Equals(value))
                {
                    this.CreateTimeField = value;
                    this.RaisePropertyChanged("CreateTime");
                }
            }
        }

        [DataMember]
        public int Id
        {
            get
            {
                return this.IdField;
            }
            set
            {
                if (!this.IdField.Equals(value))
                {
                    this.IdField = value;
                    this.RaisePropertyChanged("Id");
                }
            }
        }

        [DataMember]
        public string OrderId
        {
            get
            {
                return this.OrderIdField;
            }
            set
            {
                if (!object.ReferenceEquals(this.OrderIdField, value))
                {
                    this.OrderIdField = value;
                    this.RaisePropertyChanged("OrderId");
                }
            }
        }

        [DataMember(Order=4)]
        public Guid UserId
        {
            get
            {
                return this.UserIdField;
            }
            set
            {
                if (!this.UserIdField.Equals(value))
                {
                    this.UserIdField = value;
                    this.RaisePropertyChanged("UserId");
                }
            }
        }
    }
}

